package main

import (
	"marks/marks"
	"marks/web"
	"os"
	"time"
)

func main() {
	sw := make(chan bool,1)
	shell := marks.NewShell(marks.DB_Path,"SNOW")

	go func() {
		marks.IpfsInit(shell,sw)
	}()

	go func() {
		web.StartWeb(shell)
	}()

	for{
		select {

		case b:= <- sw:
			if b == true{
				shell.Chain.Db.Db.Close()
				os.Exit(1)
			}
		default:
			time.Sleep(100*time.Microsecond)
		}
	}

}




